angular.module('app.routes', [])

  .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {

    // Ionic uses AngularUI Router which uses the concept of states
    // Learn more here: https://github.com/angular-ui/ui-router
    // Set up the various states which the app can be in.
    // Each state's controller can be found in controllers.js
    $stateProvider

      .state('loading', {
        url: '/loading',
        templateUrl: 'templates/loading.html',
        controller: 'LoadingCtrl'
      })


      .state('signIn', {
        url: '/signIn',
        templateUrl: 'templates/login.html',
        controller: 'SignInCtrl',

        onEnter: function () {
          //$ionicNavBarDelegate.backButton.showBackButton(false);
          // console.log('SignInController onEnter');
        },
        onExit: function () {
          // console.log('SignInController onExit');
          //$ionicNavBarDelegate.backButton.showBackButton(true);
        }
      })

      .state('signUp', {
        url: '/register',
        templateUrl: 'templates/signUp.html',
        controller: 'SignUpCtrl'
      })


      .state('ordinaryRegisterBasic', {
        url: '/ordinary-register-basic',
        templateUrl: 'templates/ordinaryRegisterBasic.html',
        controller: 'ordinaryRegisterBasicCtrl'
      })


      .state('hotelRegisterLbasic', {
        url: '/hotel-register-lbasic',
        templateUrl: 'templates/hotelRegisterLbasic.html',
        controller: 'hotelRegisterLbasicCtrl'
      })


      .state('hotelRegisterLegalPerson', {
        url: '/hotel-register-legal-person',
        templateUrl: 'templates/hotelRegisterLegalPerson.html',
        controller: 'hotelRegisterLegalPersonCtrl'
      })


      .state('menu', {
        url: '/menu',
        templateUrl: 'templates/menu.html',
        controller: 'MenuCtrl'
      })


      .state('hotelAddWorker', {
        url: '/hotel-add-worker',
        templateUrl: 'templates/hotelAddWorker.html',
        controller: 'HotelAddWorkerCtrl'
      })


      .state('hotelNotApprovedTip', {
        url: '/hotel-default',

        templateUrl: 'templates/hotelNotApprovedTip.html',
        controller: 'HotelNotApprovedTipCtrl'

      })
      .state('hotelAddGuest', {
        url: '/hotel-add-guest',

        templateUrl: 'templates/hotelAddGuest.html',
        controller: 'HotelAddGuestCtrl'

      })
      .state('modifyPwd', {
        url: '/modifyPwd',

        templateUrl: 'templates/modifyPwd.html',
        controller: 'ModifyPwdCtrl'

      })

      .state('hotelGuestList', {
        url: '/hotel-guest-list',

        templateUrl: 'templates/hotelGuestList.html',
        controller: 'HotelGuestListCtrl'

      })


      .state('ordinaryBasicInfo', {
        url: '/ordinary-basic-info',
        templateUrl: 'templates/ordinaryBasicInfo.html',
        controller: 'ordinaryBasicInfoCtrl'
      })

      /**
       * 旅馆基本信息
       */
      .state('hotelBasicInfo', {
        url: '/hotel-basic-info',

        templateUrl: 'templates/hotelBasicInfo.html',
        controller: 'HotelBasicInfoCtrl'

      })


      .state('hotelEgalPersonInfo', {
        url: '/hotel-egal-person-info',

        templateUrl: 'templates/hotelEgalPersonInfo.html',
        controller: 'hotelEgalPersonInfoCtrl'

      })

      /**
       * 旅馆用户被审核拒绝后重新提交资料
       */
      .state('resubmitMaterial', {
        url: '/hotel-resubmit-material',

        templateUrl: 'templates/resubmitMaterial.html',
        controller: 'ResubmitMaterialCtrl'


      })


      .state('hotelWorkerList', {
        url: '/hotel-worker-list',

        templateUrl: 'templates/hotelWorkerList.html',
        controller: 'hotelWorkerListCtrl'

      })


      .state('feedback', {
        url: '/feedback',

        templateUrl: 'templates/feedback.html',
        controller: 'FeedbackCtrl'

      })

      .state('feedbackHistoryList', {
        url: '/feedbackHistoryList',

        templateUrl: 'templates/feedbackHistoryList.html',
        controller: 'FeedbackHistoryListCtrl'


      })
      .state('FeedbackDetail', {
        url: '/FeedbackDetail',

        templateUrl: 'templates/FeedbackDetail.html',
        controller: 'FeedbackDetailCtrl'

      })


      .state('auxiliaryPoliceRecordPerson', {
        url: '/auxiliary-police-record-person',

        templateUrl: 'templates/auxiliaryPoliceRecordPerson.html',
        controller: 'AuxiliaryPoliceRecordPersonCtrl'

      })


      .state('auxiliaryPoliceRecordVehicle', {
        url: '/auxiliary-police-record-vehicle',

        templateUrl: 'templates/auxiliaryPoliceRecordVehicle.html',
        controller: 'auxiliaryPoliceRecordVehicleCtrl'

      })


      .state('auxiliaryPoliceRecordGoods', {
        url: '/auxiliary-police-record-goods',

        templateUrl: 'templates/auxiliaryPoliceRecordGoods.html',
        controller: 'auxiliaryPoliceRecordGoodsCtrl'

      })


      .state('auxiliaryPoliceRecordEvent', {
        url: '/auxiliary-police-record-event',

        templateUrl: 'templates/auxiliaryPoliceRecordEvent.html',
        controller: 'auxiliaryPoliceRecordEventCtrl'

      })

      /**
       /**
       * 协警录入数据: 人员详细信息
       */
      .state('auxiliaryPoliceRecordPersonDetail', {
        url: '/auxiliary-police-record-person-detail',

        templateUrl: 'templates/auxiliaryPoliceRecordPersonDetail.html',
        controller: 'AuxiliaryPoliceRecordPersonDetailCtrl'

      })
      /**
       * 协警录入数据: 事件详细信息
       */
      .state('auxiliaryPoliceRecordEventDetail', {
        url: '/auxiliary-police-record-event-detail',

        templateUrl: 'templates/auxiliaryPoliceRecordEventDetail.html',
        controller: 'AuxiliaryPoliceRecordEventDetailCtrl'

      })
      /**
       * 协警录入数据: 物品详细信息
       */
      .state('auxiliaryPoliceRecordGoodsDetail', {
        url: '/auxiliary-police-record-goods-detail',

        templateUrl: 'templates/auxiliaryPoliceRecordGoodsDetail.html',
        controller: 'AuxiliaryPoliceRecordGoodsDetailCtrl'

      })
      /**
       * 协警录入数据: 车辆信息
       */
      .state('auxiliaryPoliceRecordVehicleDetail', {
        url: '/auxiliary-police-record-vehicle-detail',

        templateUrl: 'templates/auxiliaryPoliceRecordVehicleDetail.html',
        controller: 'AuxiliaryPoliceRecordVehicleDetailCtrl'

      })


      .state('notifycation', {
        url: '/notifycation',
        templateUrl: 'templates/notifycation.html',
        controller: 'NotifycationCtrl'
      })
      .state('notifycationDetail', {
        url: '/notifycationDetail',

        templateUrl: 'templates/notifycationDetail.html',
        controller: 'NotifycationDetailCtrl'

      })
      .state('privateMessageDetail', {
        url: '/privateMessageDetail',

        templateUrl: 'templates/privateMessageDetail.html',
        controller: 'PrivateMessageDetailCtrl'

      })


      .state('auxiliaryPoliceRecordList', {
        url: '/auxiliary-police-record-list',

        templateUrl: 'templates/auxiliaryPoliceRecordList.html',
        controller: 'auxiliaryPoliceRecordListCtrl'

      })
      .state('auxiliaryPoliceRecordQuery', {
        url: '/auxiliary-police-record-query',

        templateUrl: 'templates/auxiliaryPoliceRecordQuery.html',
        controller: 'AuxiliaryPoliceRecordQuery'

      })


      .state('policeGroup', {
        url: '/police-group',

        templateUrl: 'templates/policeGroup.html',
        controller: 'PoliceGroupCtrl'

      })

      .state('policeGroupChat', {
        url: '/police-group-chat',

        templateUrl: 'templates/policeGroupChat.html',
        controller: 'PoliceGroupChatCtrl'

      })
      .state('policeGroupSetting', {
        url: '/police-group-chat-setting',

        templateUrl: 'templates/policeGroupSetting.html',
        controller: 'PoliceGroupSettingCtrl'

      });


    $urlRouterProvider.otherwise('/loading');

  }]);
